//
//  KCReimburseContentCell.swift
//  MyKC
//
//  Created by yy on 2017/2/23.
//  Copyright © 2017年 com.yasuo. All rights reserved.
//

import UIKit
class KCReimburseContentCell: UITableViewCell {
    //声明闭包------------
    var reimburseBlock : (() -> ())?
    lazy var reimAllTypeInputView = KCReimAllTypeView.reimAllTypeView()
    
    var typeArray: [KCReimTypeModel]? {
        //外界已经完成了的赋值
        didSet {
           reimAllTypeInputView.typeArray = typeArray
//            reimAllTypeInputView.pickerView.reloadAllComponents()
        }
    }
    
    @IBOutlet weak var tf_selReimContent: UITextField!
    @objc func beginEdit(sender: UITextField) {
        reimburseBlock?()
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        tf_selReimContent.inputView = reimAllTypeInputView
        tf_selReimContent.addTarget(self, action: #selector(beginEdit(sender:)), for: UIControlEvents.editingDidBegin)
    }
    @IBAction func seleTypeBtnClick(_ sender: UIButton) {
        tf_selReimContent.becomeFirstResponder()
    }
    
}
